/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package sigmacinema.entity;

import java.util.Date;
import java.util.List;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author sangaji
 */
@Entity
@Table(name="TB_Ticket")
public class Ticket {
    
    @Id
    @GeneratedValue
    @Column(name="ticket_id")
    private Integer id;
    
    @ManyToOne
    @JoinColumn(name="schedule_id")
    private Schedule schedule;
    
    @ManyToOne
    @JoinColumn(name="seat_id")
    private Seat seat;
    
    @Temporal(TemporalType.DATE)
    @Column(name="ticket_date")
    private Date ticketDate;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Schedule getSchedule() {
        return schedule;
    }

    public void setSchedule(Schedule schedule) {
        this.schedule = schedule;
    }

    public Seat getSeat() {
        return seat;
    }

    public void setSeat(Seat seat) {
        this.seat = seat;
    }

    public Date getTicketDate() {
        return ticketDate;
    }

    public void setTicketDate(Date ticketDate) {
        this.ticketDate = ticketDate;
    }
}
